# @arthor quoc.le
#! C:/Perl/bin/perl -w
use strict;
use warnings;
use diagnostics;

# demo hash of hash
# value of hash is a key of another hash

my %data = ('John Paul' => 'tc45', 'Lisa' => 30, 'Kumar' => 40);
my %data2 = ('John Paul2' => 'tc452', 'Lisa2' => '230', 'Kumar2' => '240');
sub hOfh
{
	my $key1 = shift;
	my $key2 = $data{$key1};
	if($key2 eq "tc45")
	{
		return %data2;
	}
	# print $key2;
}
my @names = keys %data;

print "$names[0]\n";
print "$names[1]\n";
print "$names[2]\n";

my $key = $data{$names[1]};
print "name :",$names[0];
print "\nkey: ",$key;
print hOfh($names[0]);